# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kio-fuse
pkgver=4.95.0
pkgrel=0
arch="all !armhf"
url="https://kde.org/"
pkgdesc="FUSE interface for KIO"
license="GPL-3.0-only"
makedepends="extra-cmake-modules qt5-qtbase-dev kcoreaddons-dev kdbusaddons-dev
	kio-dev fuse3-dev"
checkdepends="dbus"
source="https://download.kde.org/unstable/kio-fuse/$pkgver/kio-fuse-$pkgver.tar.xz
	modules-load.conf"
install="$pkgname.post-install"
options="!check" # Only test is broken

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install

	install -Dm644 "$srcdir"/modules-load.conf "$pkgdir"/usr/lib/modules-load.d/kio-fuse.conf

	# Part of systemd-tmpfiles
	rm -rf "$pkgdir"/usr/lib/tmpfiles.d
}

sha512sums="a4c2ce4bdee6aefa7fcb5bc16d5179e87ec513259b754ffeb75d5d4836c56f05e417cb8b605e3cae33bc93b0cf61fb7042b3edf476d3d9e312a1fd65578ba4b5  kio-fuse-4.95.0.tar.xz
57d23d2778556eafc3035e6be575bf95b4032f123b35f2b1657eff5e7496de253173edc657f90531ee58e25673f4f27a5cd1cc76b14a038edb244f104a231771  modules-load.conf"
